import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import { Loading } from "element-ui";

Vue.config.productionTip = false
import '@/components' // icon
import '@/icons' // icon
import '@/permission' // permission control
import '@/plugins/element-ui'
import '@/styles/index.scss'
let loading = null
Vue.prototype.$loading = () => {
  loading = Loading.service({
    lock: true,
    text: '加载中...',
    spinner: 'el-icon-loading',
    background: 'rgba(0, 0, 0, 0.3)'
  })
}
Vue.prototype.$closeLoading = () => {
  loading.close()
}
new Vue({
  router,
  store,
  render: (h) => h(App)
}).$mount('#app')
